const express = require('express')
// const mongodb = require('./mongodb')
const cors = require('cors')

const app = express()

app.use(cors)
app.use(express.json())
app.use(express.urlencoded({ extended: false }))

app.get('/aa',(req,res)=>{
    console.log(111111)
    // 调用 express 提供的 res.send() 方法，向客户端响应一个 JSON 对象
    res.send({ name: 'zs', age: 99, gender: '男' })
})

app.listen(8300, ()=>console.log('running http://localhost:8300'))